package com.devops.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.devops.admin.model.DOSResource;
import com.devops.admin.po.DOSResourcePo;
import com.devops.admin.vo.DOSResourceVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @ClassName DOSResourceMapper
 * @Description TODO
 * @Author hepingguo
 * @Date 2022/6/8 11:21
 **/
@Mapper
public interface DOSResourceMapper extends BaseMapper<DOSResource> {

    /**
     * @Author heyabo
     * @Description 分页查询资源信息
     * @Date 15:52 2022/6/8
     * @Param [page, resource]
     * @return java.util.List<com.devops.admin.model.DOSResource>
     **/
    List<DOSResourcePo> selectResource(Page<DOSResourcePo> page, @Param("param") DOSResourceVo resource);

    /**
     * @Author heyabo
     * @Description 分页查询资源信息
     * @Date 15:52 2022/6/8
     * @Param [page, resource]
     * @return java.util.List<com.devops.admin.model.DOSResource>
     **/
    List<DOSResourcePo> selectResource(@Param("param") DOSResourceVo resource);

    /**
     * @Author heyabo
     * @Description 查询绑定和未绑定项目的资源
     * @Date 16:56 2022/6/13
     * @Param [projectId, type]
     * @return java.util.List<com.devops.admin.po.DOSResourcePo>
     **/
    List<DOSResourcePo> getBindResource(Integer projectId, Integer type);
}
